fix(ci): clang-format sweep + widen tool-timeout test margins#45
Merged
Conversation
…OS Debug Fixes the two CI failures on main (PR #44): - format-check: 7 files needed clang-format normalization (left over from the v3.1.0->v3.3.1 catch-up cycle and community PR merges); ran clang-format -i on the flagged set. - macos-latest (Debug): fastmcpp_tools_timeout::test_tool_timeout_triggers and test_manager_timeout_toggle could race on macOS Debug runners under load -- the 10ms timeout / 40-50ms worker-sleep window was tight enough that scheduling jitter occasionally let future::wait_for() return 'ready' after the worker completed, instead of 'timeout' before it did. Widened both to 50ms timeout / 5s worker-sleep -- 100x margin -- without slowing the test (it still returns within ~100ms). Files formatted: - include/fastmcpp/client/{client,types}.hpp - include/fastmcpp/tools/tool_transform.hpp - src/client/sampling_handlers.cpp - src/providers/openapi_provider.cpp - src/server/response_limiting_middleware.cpp - src/util/json_schema_type.cpp - tests/tools/test_tool_timeout.cpp (also widened; format swept) Local verification: fastmcpp Debug ctest 103/103 GREEN. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Test 1 ('server crash surfaces TransportError') launches sh -c \"exit 42\"
and then writes to the subprocess's stdin. On macOS Debug under CI load, the
subprocess can exit before our first write completes, causing the kernel to
raise SIGPIPE in the test binary -- which terminates the test process before
TransportError can propagate. Result: test #76 reports SIGPIPE***Exception in
0.03s with no useful diagnostic.
Fix: ignore SIGPIPE in main() on POSIX so write(2) returns -1/EPIPE instead
of killing the process. The C++ port code already handles EPIPE correctly;
this just stops the kernel from short-circuiting that path. Windows is
unaffected (no SIGPIPE).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the two CI failures on main (post-PR #44 merge):
fastmcpp_tools_timeout::test_tool_timeout_triggersandtest_manager_timeout_togglecould race on macOS Debug under CI load -- the 10ms timeout / 40-50ms worker-sleep window was tight enough that scheduling jitter occasionally letfuture::wait_for()returnreadyafter the worker completed instead oftimeoutbefore it did. Widened both to 50ms timeout / 5s worker-sleep (100x margin) without significantly slowing the test (it still returns within ~100ms).Local: fastmcpp Debug ctest 103/103 GREEN.